package com.heima.wemedia.controller.v1;

import com.heima.model.common.dtos.PageRequestDTO;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.wemedia.service.FansPortraitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.bind.annotation.*;

@Api("粉丝管理api")
@RestController
@RequestMapping("/api/v1/user_fans")
public class UserFansController {
    @Autowired
    private FansPortraitService fansPortraitService;
    @ApiOperation("粉丝画像")
    @GetMapping("/fans_portrait")
    public ResponseResult fansPortrait(){
        return fansPortraitService.fansPortrait();
    }
    @ApiOperation("粉丝列表")
    @PostMapping("/list")
    public ResponseResult list(@RequestBody PageRequestDTO dto){
        return fansPortraitService.list(dto);
    }

}
